package com.numberone.master.modules.card.dao;

import org.apache.ibatis.annotations.Param;

import com.numberone.master.common.persistence.CrudDao;
import com.numberone.master.common.persistence.annotation.MyBatisDao;
import com.numberone.master.modules.card.entity.CardAmount;

/**
 * 流量卡余额DAO接口
 * @author ck
 * @version 2018-07-11
 */
@MyBatisDao
public interface CardAmountDao extends CrudDao<CardAmount> {
	
	CardAmount selectCardAmountByIccid(@Param("iccid")String iccid);
	
	void addAmount(@Param("iccid")String iccid,@Param("availableAmount")Double availableAmount);

	void subtractAmount(@Param("iccid")String iccid,@Param("availableAmount")Double availableAmount,@Param("freezingAmount")Double freezingAmount);
	
	void updateByIccid(@Param("iccid")String iccid,@Param("auto_top_up")Integer autoTopUp);
}